package gamble.notice.command;

import gamble.notice.dao.BoardDaoImp;
import gamble.notice.vo.BoardVO;

import java.io.File;
import java.io.FileOutputStream;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;


@Controller
public class DeleteController {
	
	private BoardDaoImp dao;
	private String realUploadPath;
	
	public void setDao(BoardDaoImp dao) {
		this.dao = dao;
	}	

	@RequestMapping(value="/delete.htm",method=RequestMethod.POST)
	public String deleteSubmit(HttpServletRequest req,BoardVO vo){
		
		int del=(Integer.parseInt(req.getParameter("num")));

		dao.getDelete(del);	
		return "redirect:/list.htm";
	}
}
